using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using CR.Application.DTOs;
using CR.ErrorCode;

namespace CR.Application.Interfaces
{
    /// <summary>
    /// 养殖信息服务接口
    /// </summary>
    public interface IBreedingInfoService
    {
        /// <summary>
        /// 获取所有养殖信息
        /// </summary>
        /// <returns>养殖信息列表</returns>
        Task<ApiResult<IEnumerable<BreedingInfoDTO>>> GetAllBreedingInfosAsync();

        /// <summary>
        /// 根据ID获取养殖信息
        /// </summary>
        /// <param name="id">养殖信息ID</param>
        /// <returns>养殖信息</returns>
        Task<ApiResult<BreedingInfoDTO>> GetBreedingInfoByIdAsync(Guid id);

        /// <summary>
        /// 根据溯源码获取养殖信息
        /// </summary>
        /// <param name="traceabilityCode">溯源码</param>
        /// <returns>养殖信息</returns>
        Task<ApiResult<BreedingInfoDTO>> GetBreedingInfoByTraceabilityCodeAsync(string traceabilityCode);

        /// <summary>
        /// 创建养殖信息
        /// </summary>
        /// <param name="breedingInfoDto">养殖信息DTO</param>
        /// <returns>创建后的养殖信息</returns>
        Task<ApiResult<BreedingInfoDTO>> CreateBreedingInfoAsync(BreedingInfoDTO breedingInfoDto);

        /// <summary>
        /// 更新养殖信息
        /// </summary>
        /// <param name="id">养殖信息ID</param>
        /// <param name="breedingInfoDto">养殖信息DTO</param>
        /// <returns>更新后的养殖信息</returns>
        Task<ApiResult<BreedingInfoDTO>> UpdateBreedingInfoAsync(Guid id, BreedingInfoDTO breedingInfoDto);

        /// <summary>
        /// 删除养殖信息
        /// </summary>
        /// <param name="id">养殖信息ID</param>
        /// <returns>操作结果</returns>
        Task<ApiResult> DeleteBreedingInfoAsync(Guid id);

        /// <summary>
        /// 分页获取养殖信息
        /// </summary>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">每页大小</param>
        /// <param name="breed">品种筛选</param>
        /// <param name="startDateFrom">开始养殖日期起始</param>
        /// <param name="startDateTo">开始养殖日期截止</param>
        /// <returns>分页养殖信息</returns>
        Task<ApiResult<ApiPagin<BreedingInfoDTO>>> GetPagedBreedingInfosAsync(
            int pageIndex,
            int pageSize,
            string breed = null,
            DateTime? startDateFrom = null,
            DateTime? startDateTo = null);
    }
} 